using MicroMsg.Common.Utils;
using MicroMsg.Manager;
using MicroMsg.Protocol;
using MicroMsg.Resource.@string;
using MicroMsg.Storage;
using MicroMsg.UI.Page;
using MicroMsg.UI.UserContrl;
using MicroMsg.UI.Util;
using System;
using System.Windows;
using System.Windows.Media.Imaging;
namespace MicroMsg.Plugin.fmessage
{
	public class fmessage : PluginBase
	{
		private const string TAG = "fmessage";
		public const string PluginKey = "Plugin fmessage";
		public const long PluginID = 32775L;
		public const string PluginName = "fmessage";
		public const int PluginVersion = 256;
		private static fmessage mInstance;
		public override string mTitle
		{
			get
			{
				return strings.Con_FMsg_TxtName;
			}
		}
		public override BitmapSource mIcon
		{
			get
			{
				if (MMTheme.IsCoolBlackTheme())
				{
					return ImageCacheMgr.loadFromRes("Resource/Img/CommonUse/SystemHeadImgs/PluginHead_fmessage.png");
				}
				return ImageCacheMgr.loadFromRes("Resource/Img/CommonUse/SystemHeadImgs/PluginHead_fmessage_light.png");
			}
		}
		public override BitmapSource mIconHD
		{
			get
			{
				return null;
			}
		}
		public override BitmapSource mIconInList
		{
			get
			{
				if (MMTheme.IsCoolBlackTheme())
				{
					return ImageCacheMgr.loadFromRes("Resource/Img/CommonUse/SystemHeadImgs/PluginHead_fmessage.png");
				}
				return ImageCacheMgr.loadFromRes("Resource/Img/CommonUse/SystemHeadImgs/PluginHead_fmessage_light.png");
			}
		}
		public override string mDescription
		{
			get
			{
				return "fmessage";
			}
		}
		public override string mAuthor
		{
			get
			{
				return "tencent";
			}
		}
		public fmessage()
		{
			this.mKey = "Plugin fmessage";
			this.mID = 32775L;
			this.mName = "fmessage";
			this.mUserName = "fmessage";
			this.mVersion = 256;
			this.mIndexInTab = MainTabIndex.ContactTab;
			this.mIndexInGroup = 2;
			this.mIndexInPosition = 0;
			this.mDefaultInstalled = true;
			fmessage.mInstance = this;
		}
		public override PluginSettingBaseCtrl GetPluginSettingCtrl()
		{
			return null;
		}
		private void onBtnClickfmessage(object sender, RoutedEventArgs e)
		{
			this.execute(4, null);
		}
		public static fmessage getInstance()
		{
			return fmessage.mInstance;
		}
		public override void onRegisterResult(RetConst retConst_0, int code)
		{
			Log.smethod_4("fmessage", string.Concat(new object[]
			{
				"on register result , ret = ",
				retConst_0,
				", code = ",
				code
			}));
		}
		public override bool onInitialize()
		{
			Log.smethod_4("fmessage", "initialize. ");
			return true;
		}
		public override bool onInstalled(InstallMode mode)
		{
			Log.smethod_4("fmessage", "on inistalled. ");
			return true;
		}
		public override bool onUninstalled(InstallMode mode)
		{
			Log.smethod_4("fmessage", "on uninstalled. ");
			return true;
		}
		public override bool onParseChatMsg(ChatMsg chatMsg)
		{
			return false;
		}
		public override object execute(int entryType, object args)
		{
			Log.smethod_4("fmessage", "plugin execute,   entrytype =" + entryType);
			ChatContainerPage.GoToChatPage(PageManager.getInstance().GetTopPage(), this.mUserName, null, null, null);
			if (entryType == 1)
			{
				return null;
			}
			if (entryType == 2)
			{
				return null;
			}
			if (entryType == 3)
			{
				return null;
			}
			if (entryType == 4)
			{
				return null;
			}
			return null;
		}
	}
}
